<!doctype html>
<html>
<head>
    <include file="public/head"/>
    <title>客服系统</title>
    <meta name="description" content="客服系统">
    <meta name="keywords" content="客服系统">
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>客服系统后台</a></li>
    </ul>
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a href="{:cmf_plugin_url('LyzKefuChat://AdminIndex/index')}">客服系统设置</a></li>
            <li class="active"><a href="{:cmf_plugin_url('LyzKefuChat://AdminIndex/kefuList')}">客服列表</a></li>
            <li class="active"><a href="{:cmf_plugin_url('LyzKefuChat://AdminIndex/kefuAdd')}">客服添加</a></li>
            <li class="active"><a href="{:cmf_plugin_url('LyzKefuChat://AdminIndex/status')}">客服系统服务状态查看（win）</a></li>
        </ul>
        <if $data.php_os == 'win'>
        <table class="table table-bordered">
            <caption style="text-align: center;color: #000000;">----------------------- WORKERMAN ------------------------------</caption>
            <caption style="text-align: center;color: #000000;">Workerman version:{$data.workerman_version}          PHP version:{$data.php_version}</caption>
            <caption style="text-align: center;color: #000000;">------------------------ WORKERS ----------------------------------</caption>
            <thead>
            <tr>
                <th>名称(worker)</th>
                <th>监听(listen)</th>
                <th>进程(processes)</th>
                <th>状态(status)</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>Register</td>
                <td>{$data.register||default=''}</td>
                <td>1</td>
                <td><if $data['status']==1><span style="color: #1dc116;">[OK]</span><else/><span style="color: red;">[NO]</span></if></td>
            </tr>
            <tr>
                <td>{$data.gateway_processes_name||default=''}</td>
                <td>{$data.gateway||default=''}</td>
                <td>{$data.gateway_processes_num||default=''}</td>
                <td><if $data['status']==1><span style="color: #1dc116;">[OK]</span><else/><span style="color: red;">[NO]</span></if></td>
            </tr>
            <tr>
                <td>{$data.worker_processes_name||default=''}</td>
                <td>none</td>
                <td>{$data.worker_processes_num||default=''}</td>
                <td><if $data['status']==1><span style="color: #1dc116;">[OK]</span><else/><span style="color: red;">[NO]</span></if></td>
            </tr>
            </tbody>
        </table>
        <else/>
        <h2>该查看只支持win环境查看</h2>
        </if>
    </div>
    <h4>注意：如果状态显示为‘NO’,则是服务进程未被开启，需要到thinkcmf项目根目录中的‘public/plugins/lyz_kefu_chat/start/start_for_win.bat’双击打开即可。</h4>
</div>
<include file="public/scripts"/>
<script>
    function recover()
    {
        var id = $("input[name=id]").attr('value');
        $.post("{:cmf_plugin_url('LyzKefuChat://AdminIndex/recover')}",{id:id},function(data){
            if(data){
                layer.msg('恢复默认成功',{time: 2000}, function(){
                    location.reload();
                });
            }else {
                layer.msg('恢复默认失败', {time: 2000}, function () {
                    location.reload();
                });
            }
        });
    }
</script>
</body>
</html>